package com.turing.post.organization.util;

import java.math.BigInteger;
import java.util.Date;
import java.util.List;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;
import com.turing.post.util.PCPSWebInput;

/**
 * @author zxp
 * @Mar 12, 2013
 */
@Remote
@Local
public interface IssueFeePolicyBusiness {

	/**
	 * 新增
	 * 
	 * @param input
	 * @param issueFeePolicy
	 * @throws PCPSApplicationException
	 */
	public void insertIssueFeePolicy(PCPSWebInput input,
			IssueFeePolicy issueFeePolicy) throws PCPSApplicationException;

	/**
	 * 修改
	 * 
	 * @param input
	 * @param issueFeePolicy
	 * @throws PCPSApplicationException
	 */
	public void updateIssueFeePolicy(PCPSWebInput input,
			IssueFeePolicy issueFeePolicy) throws PCPSApplicationException;

	/**
	 * 删除
	 * 
	 * @param input
	 * @param issueFeePolicy
	 * @throws PCPSApplicationException
	 */
	public void deleteIssueFeePolicy(PCPSWebInput input,
			IssueFeePolicy issueFeePolicy) throws PCPSApplicationException;

	/**
	 * 审核
	 * 
	 * @param input
	 * @param issueFeePolicy
	 * @throws PCPSApplicationException
	 */
	public void authIssueFeePolicy(PCPSWebInput input,
			IssueFeePolicy issueFeePolicy) throws PCPSApplicationException;

	/**
	 * 计算发卡商业务资费
	 * 
	 * @param issueCompanyNo
	 *            发卡商号
	 * @param saleBranchNo
	 *            销售机构号(可选)
	 * @param businessType
	 *            业务类型
	 * @param cardNo
	 *            卡号
	 * @param toCardClassicId
	 *            目标卡种类(仅变更卡种类需要)
	 * @param tranDate
	 *            日期
	 * @param amount
	 *            发生额或余额
	 * @return
	 */
	public IssueFeePolicy calcCardHolderFee(String issueCompanyNo,
			String saleBranchNo, String businessType, String cardNo,
			BigInteger toCardClassicId, Date tranDate, BigInteger amount)
			throws PCPSApplicationException;

	/**
	 * 计算发卡商业务资费
	 * 
	 * @param issueCompanyNo
	 *            发卡商号
	 * @param saleBranchNo
	 *            销售机构号(可选)
	 * @param businessType
	 *            业务类型
	 * @param cardNo
	 *            卡号
	 * @param cardSeqNo
	 *            卡序号
	 * @param cardFaceId
	 *            卡面ID
	 * @param cardClassicId
	 *            卡种类
	 * @param toCardClassicId
	 *            目标卡种类(仅变更卡种类需要)
	 * @param tranDate
	 *            日期
	 * @param amount
	 *            发生额或余额
	 * @param balance
	 *            卡余额
	 * @return
	 */
	public IssueFeePolicy calculateCardHolderFee(String issueCompanyNo,
			String saleBranchNo, String businessType, String cardNo,
			String cardSeqNo, BigInteger cardFaceId, BigInteger cardClassicId,
			BigInteger toCardClassicId, Date tranDate, BigInteger amount,
			BigInteger balance) throws PCPSApplicationException;

	/**
	 * 计算销售单手续费
	 * 
	 * @param list
	 *            销售信息列表
	 * @return
	 * @throws PCPSApplicationException
	 */
	public IssueFeePolicy calcSaleOrderFee(List<IssueFeePolicy> list)
			throws PCPSApplicationException;

	/**
	 * 计算销售卡手续费
	 * 
	 * @param webInput
	 * @param saleBranchNo
	 *            销售机构号(可选)
	 * @param businessType
	 *            业务类型
	 * @param startSeqNo
	 *            起始卡序号
	 * @param endSeqNo
	 *            终止卡序号
	 * @param cardFaceId
	 *            卡面ID
	 * @param cardClassicId
	 *            卡种类
	 * @param cardParvalueId
	 *            卡面值
	 * @return
	 * @throws PCPSApplicationException
	 */
	public IssueFeePolicy calcSaleCardFee(PCPSWebInput webInput,
			String saleBranchNo, String businessType, String startSeqNo,
			String endSeqNo, BigInteger cardFaceId, BigInteger cardClassicId,
			BigInteger cardParvalueId,String salesGetCardOrderNo) throws PCPSApplicationException;

	/**
	 * 计算充值卡手续费
	 * 
	 * @param webInput
	 * @param saleBranchNo
	 *            销售机构号(可选)
	 * @param businessType
	 *            业务类型
	 * @param dodList
	 *            充值卡列表
	 * @return
	 * @throws PCPSApplicationException
	 */
	public IssueFeePolicy calcDepositCardFee(PCPSWebInput webInput,
			String saleBranchNo, String businessType,
			List<IssueFeePolicy> dodList) throws PCPSApplicationException;

}
